YNQ  YNQ-1.6.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions

Functions

NQ_STATUS udInit (void)
 
void udStop (void)
 
void udResetServerParams (void)
 
void udCifsServerStarted (void)
 
void udCifsServerClosed (void)
 
void udNetBiosDaemonStarted (void)
 
void udNetBiosDaemonClosed (void)
 
void udGetScopeID (NQ_WCHAR *buffer)
 
void udGetWins (NQ_WCHAR *pServers)
 
void udGetDomain (NQ_WCHAR *buffer, NQ_BOOL *isWorkgroup)
 
void udGetDnsParams (NQ_WCHAR *domain, NQ_WCHAR *servers)
 
NQ_BOOL udGetCredentials (const void *resource, NQ_WCHAR *userName, NQ_WCHAR *password, NQ_WCHAR *domain)
 
NQ_INT udGetPassword (const NQ_WCHAR *userName, NQ_CHAR *password, NQ_INT *pwdIsHashed, NQ_UINT32 *userNumber)
 
NQ_UINT32 udGetSmbError (NQ_UINT32 sysErr)
 
NQ_UINT32 udNqToSystemError (NQ_STATUS nqErr)
 
NQ_INT udGetTransportPriority (NQ_UINT transport)
 
void udGetServerComment (NQ_WCHAR *buffer)
 
void udNetBiosDataIn (void)
 
void udServerDataIn (void)
 
void udServerShareConnect (const NQ_WCHAR *share)
 
void udServerShareDisconnect (const NQ_WCHAR *share)
 
NQ_INT udGetCodePage (void)
 
void udSetCodePage (NQ_INT codePage)
 
NQ_PORT udGetPort (NQ_PORT port)
 
void udGetComputerId (NQ_BYTE *buf)
 
NQ_COUNT udGetUserCount (void)
 
NQ_BOOL udGetUserRidByName (const NQ_WCHAR *name, NQ_UINT32 *rid)
 
NQ_BOOL udGetUserNameByRid (NQ_UINT32 rid, NQ_WCHAR *nameBuffer, NQ_WCHAR *fullNameBuffer)
 
NQ_BOOL udGetUserInfo (NQ_UINT index, NQ_UINT32 *rid, NQ_WCHAR *name, NQ_WCHAR *fullName, NQ_WCHAR *description)
 
NQ_BOOL udSetUserAsAdministrator (NQ_UINT32 rid, NQ_BOOL isAdmin)
 
NQ_BOOL udSetUserInfo (NQ_UINT32 rid, const NQ_WCHAR *name, const NQ_WCHAR *fullName, const NQ_WCHAR *descr, const NQ_WCHAR *password)
 
NQ_BOOL udCreateUser (const NQ_WCHAR *name, const NQ_WCHAR *fullName, const NQ_WCHAR *description)
 
NQ_BOOL udDeleteUserByRid (NQ_UINT32 rid)
 
NQ_BOOL udSaveShareInformation (const NQ_WCHAR *name, const NQ_WCHAR *newName, const NQ_WCHAR *newMap, const NQ_WCHAR *newDescription)
 
NQ_BOOL udRemoveShare (const NQ_WCHAR *name)
 
void udNetBiosError (NQ_STATUS cause, const NQ_CHAR *name)
 
NQ_BOOL udGetComputerSecret (NQ_BYTE **secret)
 
NQ_BOOL udGetComputerSecretByDomain (NQ_BYTE *secret, const NQ_WCHAR *domainDNS, NQ_WCHAR *domainNB)
 
void udSetComputerSecret (NQ_BYTE *secret)
 
void udSetComputerSecretByDomain (const NQ_BYTE *secret, const NQ_WCHAR *domainDNS, const NQ_WCHAR *domainNB)
 
void udGetFileSystemName (const NQ_WCHAR *shareName, const NQ_WCHAR *sharePath, NQ_WCHAR *fileSystemName)
 
void udEventLog (NQ_UINT module, NQ_UINT eventClass, NQ_UINT type, const NQ_WCHAR *userName, const NQ_IPADDRESS *pIp, NQ_UINT32 status, const NQ_BYTE *parameters)
 
NQ_BYTEudAllocateBuffer (NQ_INT idx, NQ_COUNT numBufs, NQ_UINT bufferSize)
 
void udReleaseBuffer (NQ_INT idx, NQ_COUNT numBufs, NQ_BYTE *buffAddr, NQ_UINT bufferSize)
 
NQ_INT udGetSecurityDescriptor (NQ_INT file, NQ_UINT32 information, void *buffer)
 
NQ_STATUS udSetSecurityDescriptor (NQ_INT file, NQ_UINT32 information, const void *buffer, NQ_UINT32 len)
 
NQ_COUNT udLoadShareSecurityDescriptor (const NQ_WCHAR *shareName, NQ_BYTE *buffer, NQ_COUNT bufferLen)
 
void udSaveShareSecurityDescriptor (const NQ_WCHAR *shareName, const NQ_BYTE *sd, NQ_COUNT sdLen)
 
NQ_BOOL udGetNextShareEx (NQ_WCHAR *name, NQ_WCHAR *map, NQ_BOOL *isPrinter, NQ_WCHAR *description, NQ_BOOL *isEncrypted)
 
NQ_BOOL udGetNextMount (NQ_WCHAR *name, NQ_WCHAR *map)
 
NQ_BOOL udGetMessageSigningPolicy (NQ_INT *policy)
 
NQ_BOOL udGetGlobalEncryption (void)
 
NQ_BOOL udGetInternalCapture (void)
 
void udGetCaptureFileBaseFolder (NQ_CHAR *buffer, NQ_UINT size)
 
NQ_BOOL udGetInternalTrace (void)
 
NQ_INT udGetTaskPriorities (void)
 
void udGetDriverName (NQ_CHAR *buffer)
 
void udGetHostName (NQ_CHAR *buffer, NQ_UINT length)
 
void udGetLogFileBaseFolder (NQ_CHAR *buffer, NQ_UINT size)
 
void udGetMaxDiskSize (NQ_UINT32 *size)
 

Detailed Description

Function Documentation

NQ_STATUS udInit ( void  )

Initialize UD module.

The project level code must call this function on startup before calling nqStart().

Returns
NQ_SUCCESS on success or NQ_FAIL on error.
void udStop ( void  )

Stop UD module.

The project level must call this function after calling nqStop().

void udResetServerParams ( void  )

Reset server parameters

This function reset the value of server parameters that was loaded from server configuration file, it should be called during server restart.

void udCifsServerStarted ( void  )

NQ signals to the project level of the server startup complete. Now NQ Server is ready to accept incoming connections.

The default implementation of this function prints a message on console. Integrators may modify it to take measures on the server startup.

void udCifsServerClosed ( void  )

NQ signals to the project level of the server shutdown. Now NQ Server does not accept anymore incoming connections.

The default implementation of this function prints a message on console. Integrators may modify it to take measures on the server shutdown.

void udNetBiosDaemonStarted ( void  )

NQ signals to the project level of NetBIOS Daemon readiness.

The default implementation of this function is empty. Integrators may modify it to take measures on the daemon startup.

void udNetBiosDaemonClosed ( void  )

NQ signals to the project level of NetBIOS Daemon shutdown.

The default implementation of this function is empty. Integrators may modify it to take measures on the daemon shutdown.

void udGetScopeID ( NQ_WCHAR buffer)

Obtain the system's Scope ID for NetBIOS. Parameters

Parameters
bufferBuffer for the result of at least 16 bytes.
void udGetWins ( NQ_WCHAR pServers)

Obtain wins addresses information.

This function allows to obtain the default WINS addresses. To add more WINS addresses, use cmNetBiosSetWins() or cmNetBiosSetWinsA().

Parameters
pServersOUT A semicolon-delimited list of WINS servers.
Note
Returns WINS servers as supplied by User Defined level (for example cm_cfg.txt).
void udGetDomain ( NQ_WCHAR buffer,
NQ_BOOL isWorkgroup 
)

Get the default domain or workgroup name.

NQ calls this function once on startup. The domain name may be modified later by calling the cmDnsSetDomain() functions.

Parameters
bufferBuffer for the result of at least 16 bytes.
isWorkgroup,:TRUE for a workgroup name, FALSE for a domain name.
void udGetDnsParams ( NQ_WCHAR domain,
NQ_WCHAR servers 
)

Get DNS initialization parameters (DNS addresses and domain)

This function is called by NQ on startup. It must bring the default list of DNS servers. More DNS servers may be added later by calling the cmDnsSetServers() function.

Parameters
domainThe default domain target belongs to.
serversA semicolon-delimited list of DNS servers.
Note
Returns DNS servers as supplied by User Defined level (for example cm_cfg.txt)
NQ_BOOL udGetCredentials ( const void *  resource,
NQ_WCHAR userName,
NQ_WCHAR password,
NQ_WCHAR domain 
)

Get authentication parameters for connecting domain controllers.

NQ uses embedded SMB client for domain authentication, joining domain and domain logon. The credentials used during these transactions should be sufficient.

Parameters
resourceURI of the destination to connect to.
userNameBuffer for user name. This buffer is 256 wide characters at least.
passwordBuffer for password. This buffer is 256 wide characters at least.
domainBuffer for domain name. This buffer is 256 wide characters at least.
Returns
TRUE when credentials were obtained, FALSE on failure.
NQ_INT udGetPassword ( const NQ_WCHAR userName,
NQ_CHAR password,
NQ_INT pwdIsHashed,
NQ_UINT32 userNumber 
)

Check password for a specific user.

NQ Server calls this function on SMB logon (session setup) to authenticate a local user. This function is called in the following cases:

  • No domain Controller was detected and, therefore, domain logon is not available.
  • Domain logon failed for any reason. NQ calls this function to obtain the password for the user being authenticated. When this function returns with a password, NQ compares it with the values received from the client over SMB. On match user becomes authenticated with NQ. Since the password received over the wire is hashed, NQ requires hashed passwords.

Plain text passwords are deprecated.

The default implementation of this function reads passwords froma configuration file.

Parameters
userNameUser name as a null-terminated string in UTF-16LE.
passwordBuffer for user's password. This password must be hashed. Plain text passwords are deprecated.
pwdIsHashedBuffer for password has flag as: TRUE when password is hashed, FALSE when password is plain text. Plain text passwords are deprecated.
userNumberUnique user ID (RID).
Returns
One of the following:
  • NQ_CS_PWDFOUND : User name was found and the password is returned as both LM and NTLM hash.
  • NQ_CS_PWDNOAUTH : User was authenticated without checking password.
  • NQ_CS_PWDNOUSER : No such user.
  • NQ_CS_PWDLMHASH : User name was found and the password is LM hash.
  • NQ_CS_PWDANY : User name was found and the password is returned as both LM and NTLM hash.
NQ_UINT32 udGetSmbError ( NQ_UINT32  sysErr)

This function reads last system error and attempts to convert it into an SMB error.

This function may implement a customized error code conversion. If this conversion fails (a zero value is returned) NQ will use the default conversion. Its default implementation always returns zero.

Parameters
sysErrsystem error code to convert
Returns
SMB error or zero to use the default conversion.
NQ_UINT32 udNqToSystemError ( NQ_STATUS  nqErr)

This function converts an internal NQ error into the system error code.

NQ calls this function at the very end of a client transaction processing to map internal error on system error.

Parameters
nqErrNQ internal error code to convert. These error numbers are defined in udapi.h.
Returns
System error or 0 (then the system-dependent conversion will be taken).
NQ_INT udGetTransportPriority ( NQ_UINT  transport)

Get transport priority.

NQ Client uses this function to determine in which sequence it attempts to connect to the server. NQ Client can use three transports: NetBIOS over TCP port 139. TCP over IPv4 port 445. TCP over IPv6 port 445. The order in which NQ tries the above transports, depends on the priorities assigned by the function being described. NQ calls this function on each new connection and it does it once for each transport that was included in udparams.h.

Parameters
transportThe transport number as:
  • NS_TRANSPORT_NETBIOS - NetBIOS.
  • NS_TRANSPORT_IPV4 - IPv4.
  • NS_TRANSPORT_IPV6 - IPv6.
Returns
A priority assigned to the provided transport as:
  • 0 - the transport isn't used
  • 1..3 - the bigger number is highest priority If more then one transport has same priority built in order is used: IPv6, IPv4, NetBIOS.
void udGetServerComment ( NQ_WCHAR buffer)

Get server comment string.

NQ Server uses this string in several information responses.

Parameters
bufferBuffer for the result of 256 characters at least.
void udNetBiosDataIn ( void  )

Project-level processing on incoming data to NetBios Daemon.

NQ calls this function when NetBIOS daemon receives a message. The default implementation of this function is empty.

void udServerDataIn ( void  )

Project-level processing on incoming data to NQ Server.

NQ calls this function when SMB engine receives a message. The default implementation of this function is empty.

void udServerShareConnect ( const NQ_WCHAR share)

Project-level processing on client connection to a share.

NQ calls this function when SMB engine receives a tree connect request (Tree Connect). The default implementation of this function is empty.

Parameters
shareName of the share being connected.
void udServerShareDisconnect ( const NQ_WCHAR share)

Project-level processing on client disconnect from a share.

NQ calls this function when SMB engine receives a tree disconnect request (Tree Disconnect). The default implementation of this function is empty.

Parameters
shareName of the share being disconnected.
NQ_INT udGetCodePage ( void  )

Get current code page number.

NQ uses code pages when conversion from UTF-16LE to ANSI characters or vice versa happens. This may happen for host and domain names through NetBIOS and DNS.

Returns
Code page number according to IANA.
void udSetCodePage ( NQ_INT  codePage)

Set current code page number.

NQ uses code pages when conversion from UTF-16LE to ANSI characters or vice versa happens. This may happen for host and domain names through NetBIOS and DNS.

Parameters
codePageCode page number.
NQ_PORT udGetPort ( NQ_PORT  port)

Redefine port number.

NQ uses the following ports:

  • Port 137 - NetBIOS Naming Service listener
  • Port 138 - NetBIOS Datagram Service listener
  • Port 139 - NetBIOS Session Service listener
  • Internal ports used for communication between NQ Server and NetBIOS daemon. For coexistence with other network components NQ allows to redefine any of those ports by means of this function. NQ calls it each time a port is about to use, providing it with a default value. NQ uses the return value as an actual port number. The default implementation simply returns the default value thus no redefinition is performed. For redefining a port, modify this function so that it will return an alternate port number for the default port of the interest. For other ports that should not be alternated this function should continue to return its only argument.
Parameters
portThe default port number in the host byte order.
Returns
Redefined port number in the host byte order. By default this is the same number that is provided on the call.
void udGetComputerId ( NQ_BYTE buf)

Get unique ID for the current machine. The returned 12-byte value should be:

  • "Statistically unique" for the given machine.
  • Persistently the same for each call. Recommended methods are:
  • MAC address of the default adapter.
  • Product serial number when available.
Parameters
bufA 12 - byte buffer to be filled with a unique value.
NQ_COUNT udGetUserCount ( void  )

Get number of local users.

Returns
Number of local user accounts.
NQ_BOOL udGetUserRidByName ( const NQ_WCHAR name,
NQ_UINT32 rid 
)

Get local user ID by name.

It is developer's responsibility to implement a particular user management mechanism. Persistent user management may keep a list of users in a file. User RID (relative ID) should be a number unique through over the local user database.

Parameters
nameUser name as a UTF-16LE string.
ridBuffer for user's unique ID (RID).
Returns
TRUE when user was found and FALSE for a non-existing user.
NQ_BOOL udGetUserNameByRid ( NQ_UINT32  rid,
NQ_WCHAR nameBuffer,
NQ_WCHAR fullNameBuffer 
)

Get local user name by ID.

User RID (relative ID) should be a number unique through over the local user database. User name (i.e., - account name) should be also unique in the local account database. Full user name should not be necessarily unique.

Parameters
ridA unique ID.
nameBufferPointer to a buffer of 256 wide characters for user account name (short name). When the given RID corresponds to a local user the function fills this buffer with the account name.
fullNameBufferPointer to a buffer of 256 wide characters for a full user name. When the given RID corresponds to a local user the function fills this buffer with a user-friendly name to be displayed on the client.
Returns
TRUE when the ID was identified as a local user ID and FALSE for a non-existing user.
NQ_BOOL udGetUserInfo ( NQ_UINT  index,
NQ_UINT32 rid,
NQ_WCHAR name,
NQ_WCHAR fullName,
NQ_WCHAR description 
)

Enumerate local users.

The order of accounts is undefined, but all accounts should have indices from 0 to N where N is the number of users.

Parameters
indexZero-based index of user accounts in the database.
ridBuffer for RID for the index's user.
namePointer to a buffer of 256 wide characters for user account name (short name). When the given RID corresponds to a local user the function fills this buffer with the account name.
fullNamePointer to a buffer of 256 wide characters for a full user name. When the given RID corresponds to a local user the function fills this buffer with the name to be displayed on the client.
descriptionPointer to a buffer of 256 wide characters for account description. When the given RID corresponds to a local user the function fills this buffer with account description to be displayed on the client.
Returns
TRUE when a user with the given index is available or FALSE for the end of enumeration.
NQ_BOOL udSetUserAsAdministrator ( NQ_UINT32  rid,
NQ_BOOL  isAdmin 
)

Set user administrative rights.

NQ Server supports two local user groups: Users and Administrators. Any user is a member of the Users group. This function allows to make user a member in the Administrators group or to cancel user's membership in this group.

Parameters
ridA unique account ID.
isAdminTRUE to set a local user as an administrator, FALSE to remove user from the Administrators group.
Returns
TRUE when operation has succeeded, FALSE on error.
NQ_BOOL udSetUserInfo ( NQ_UINT32  rid,
const NQ_WCHAR name,
const NQ_WCHAR fullName,
const NQ_WCHAR descr,
const NQ_WCHAR password 
)

Add or modify a local user account.

It is recommended that this function return FALSE when there is another user with the same account name. It is recommended to save password in an encrypted form. Use the following code fragment to encrypt a plain text Unicode password into an MD4 hash:

cmUnicodeToAnsi(asciiPassword, password);
cmHashPassword(asciiPassword,encryptedPassword);
cmMD4(encryptedPassword+16, (NQ_BYTE*)password);
cmWStrlen(password)*sizeof(NQ_WCHAR) );
Parameters
ridA unique account ID.
nameNew account name of up to 256 wide characters.
fullNameNew full (user-friendly) user name of up to 256 wide characters.
descrNew account description of up to 256 wide characters.
passwordNew password. The password is plain text UTF-16LE.
Returns
TRUE when operation has succeeded, FALSE on error.
NQ_BOOL udCreateUser ( const NQ_WCHAR name,
const NQ_WCHAR fullName,
const NQ_WCHAR description 
)

Add a local user.

It is recommended that this function return FALSE when there is another user with the same account name. A new user may be created with an empty or a random password. An expected immediate call to udSetUserInfo() (see above) will set new password.

Parameters
nameNew account name of up to 256 wide characters.
fullNameNew full (user-friendly) user name of up to 256 wide characters.
descriptionNew account description of up to 256 wide characters.
Returns
TRUE when operation has succeeded, FALSE on error.
NQ_BOOL udDeleteUserByRid ( NQ_UINT32  rid)

Description Remove a local user.

Parameters
ridA unique account ID.
Returns
TRUE when operation has succeeded, FALSE on error.
NQ_BOOL udSaveShareInformation ( const NQ_WCHAR name,
const NQ_WCHAR newName,
const NQ_WCHAR newMap,
const NQ_WCHAR newDescription 
)

modify/create share information in a persistent store

Parameters
nameshare to modify or NULL for a new share
newNamenew share name
newMapnew share path
newDescriptionnew share description
Returns
TRUE on success, FALSE on failure
Note
user-level should return TRUE in the following cases:
  • new share was perisistently stored
  • existing share was peristently modified
  • new share was not persistently stored but it should be exposed until server shutdown
  • share was not persistently modified but this modification should be exposed until server shutdown user-level should return FALSE when a new share should not be created or an existing share should not be modified
NQ_BOOL udRemoveShare ( const NQ_WCHAR name)

remove share from the persistent store

Parameters
nameshare to remove
Returns
TRUE on success, FALSE on failure
void udNetBiosError ( NQ_STATUS  cause,
const NQ_CHAR name 
)

Report to the project level about a NetBIOS error. Parameters

Parameters
causeError code as:
  • CM_NBERR_NOTNETBIOSNAME
  • CM_NBERR_TIMEOUT
  • CM_NBERR_NEGATIVERESPONSE
  • CM_NBERR_HOSTNAMENOTRESOLVED
  • CM_NBERR_CANCELLISTENFAIL
  • CN_NBERR_SOCKETOVERFLOW
  • CM_NBERR_NOBINDBEFORELISTEN
  • CM_NBERR_ILLEGALDATAGRAMSOURCE
  • CM_NBERR_ILLEGALDATAGRAMDESTINATION
  • CM_NBERR_INVALIDPARAMETER
  • CM_NBERR_INTERNALERROR
  • CM_NBERR_ILLEGALDATAGRAMTYPE
  • CM_NBERR_DDCOMMUNICATIONERROR
  • CM_NBERR_BUFFEROVERFLOW
  • CM_NBERR_RELEASENAMEFAIL Right now only CM_NBERR_NEGATIVERESPONSE is used while others are reserved for a future use.
nameThe NetBIOS name that caused the error.
NQ_BOOL udGetComputerSecret ( NQ_BYTE **  secret)

Read computer secret.

Computer secret is a binary array of 16 bytes that NQ receives from Domain Controller after joining a domain. NQ uses this array for subsequent logon into the domain.

Parameters
secretBuffer for a secret pointer. If a value inside that buffer is non-NULL, this function should fill this buffer with a pointer to computer secret. If it is NULL, the function should check for computer secret without setting a pointer to it.
Returns
TRUE if the computer secret is available. FALSE means that the computer secret is not available for one of the following reasons:
  • NQ did not join the domain yet.
  • The computer secret was not properly saved.
  • The computer secret is not accessible.
Note
NQ assumes that computer secret is persistent and was stored in a call to the udSetComputerSecret() Function.
NQ_BOOL udGetComputerSecretByDomain ( NQ_BYTE secret,
const NQ_WCHAR domainDNS,
NQ_WCHAR domainNB 
)

Read computer secret by domain.

Computer secret is a binary array of 16 bytes that NQ receives from Domain Controller after joining a domain. NQ uses this array for subsequent logon into the domain. Parameters

Parameters
secretBuffer for a secret pointer. If a value inside that buffer is non-NULL, this function should fill this buffer with a pointer to computer secret.
domainDNSDomain name DNS
domainNBDomain name NetBIOS. If it is NULL, the function checks for computer secret which refers only to domainDNS.
Returns
TRUE if the computer secret is available and (if the secret parameter was not NULL) was copied into the buffer. FALSE means that the computer secret is not available for one of the following reasons:
  • NQ did not join the domain yet.
  • The computer secret was not properly saved.
  • The computer secret is not accessible. Buffer domainNB is populated with domain NetBIOS name.
Note
NQ assumes that computer secret is persistent and was stored in a call to the udSetComputerSecretByDomain() Function.
void udSetComputerSecret ( NQ_BYTE secret)

Save computer secret.

Computer secret is a binary array of 16 bytes that NQ receives from Domain Controller after joining a domain. NQ uses this array for subsequent logon into the domain.

Parameters
secretComputer secret pointer.
Note
NQ assumes that computer secret is persistent and after this call it will be available through a call to the udGetComputerSecret Function().
void udSetComputerSecretByDomain ( const NQ_BYTE secret,
const NQ_WCHAR domainDNS,
const NQ_WCHAR domainNB 
)

Save computer secret per domain.

Computer secret is a binary array of 16 bytes that NQ receives from Domain Controller after joining a domain. NQ uses this array for subsequent logon into the domain.

Parameters
secretComputer secret pointer.
domainDNSDomain name DNS
domainNBDomain name NetBIOS. If it is NULL, the function saves computer secret which refers only to domainDNS.
Note
NQ assumes that computer secret is persistent and after this call it will be available through a call to the udGetComputerSecretByDomain() Function.
void udGetFileSystemName ( const NQ_WCHAR shareName,
const NQ_WCHAR sharePath,
NQ_WCHAR fileSystemName 
)

Determine the file system name for the given share.

This function uses either share name or share path to determine the type of the target file system. Then it copies the name of this file system into the provided buffer. The name should not be longer than 100 characters.

Parameters
shareNamePointer to the share name.
sharePathPointer to the share path.
fileSystemNamePointer to buffer for the file system name.
void udEventLog ( NQ_UINT  module,
NQ_UINT  eventClass,
NQ_UINT  type,
const NQ_WCHAR userName,
const NQ_IPADDRESS pIp,
NQ_UINT32  status,
const NQ_BYTE parameters 
)

Event log function

Parameters
moduleNQ module that originated this event
eventClassevent class
typeevent type
userNamename of the user
pIpnext side IP address
statuszero if the operation has succeeded or error code on failure for server event this code is the same that will be transmitted to the client for an NQ CIFS client event this value is the same that will be installed as system error
parameterspointer to a structure that is filled with event data actual structure depends on event type
NQ_BYTE* udAllocateBuffer ( NQ_INT  idx,
NQ_COUNT  numBufs,
NQ_UINT  bufferSize 
)

allocate buffer in the user space

Parameters
idxbuffer index zero based
numBufstotal number of buffers to be allocated
bufferSizebuffer size in bytes
Returns
pointer to the buffer
void udReleaseBuffer ( NQ_INT  idx,
NQ_COUNT  numBufs,
NQ_BYTE buffAddr,
NQ_UINT  bufferSize 
)

release buffer in the user space

Parameters
idxbuffer index zero based
numBufstotal number of buffers to be released
buffAddrbuffer address
bufferSizebuffer size in bytes
NQ_INT udGetSecurityDescriptor ( NQ_INT  file,
NQ_UINT32  information,
void *  buffer 
)

query user-defined security descriptor

Parameters
fileID of an opened file
informationdescriptor to get
bufferoutput buffer
Returns
descriptor length
NQ_STATUS udSetSecurityDescriptor ( NQ_INT  file,
NQ_UINT32  information,
const void *  buffer,
NQ_UINT32  len 
)

write user-defined security descriptor

Parameters
fileID of an opened file
informationdescriptor to set
bufferinput buffer
lendescriptor length
Returns
NQ_SUCCESS or error code
NQ_COUNT udLoadShareSecurityDescriptor ( const NQ_WCHAR shareName,
NQ_BYTE buffer,
NQ_COUNT  bufferLen 
)

Get persistent security descriptor for share

Parameters
shareNameshare name
bufferbuffer to read SD in
bufferLenbuffer length
Returns
SD length or zero on error
void udSaveShareSecurityDescriptor ( const NQ_WCHAR shareName,
const NQ_BYTE sd,
NQ_COUNT  sdLen 
)

Save persistent security descriptor for share

Parameters
shareNameshare name
sdpointer to SD
sdLenSD length
NQ_BOOL udGetNextShareEx ( NQ_WCHAR name,
NQ_WCHAR map,
NQ_BOOL isPrinter,
NQ_WCHAR description,
NQ_BOOL isEncrypted 
)

Get next share in the list of shares for CS (extended).

Parameters
namePointer to the share name buffer.
mapPointer to the share map buffer.
isPrinter0 for file system, 1 for print queue.
descriptionbuffer for the share description
isEncrypted0 for regular share, 1 for encrypted share (SMB3)
Returns
TRUE - a share read FALSE - no more shares
NQ_BOOL udGetNextMount ( NQ_WCHAR name,
NQ_WCHAR map 
)

Get next mount in the list of mounted volumes for Client.

Parameters
namePointer to the share name buffer.
mapPointer to the share map buffer.
Returns
TRUE - more volumes in the list FALSE - no more volumes
NQ_BOOL udGetMessageSigningPolicy ( NQ_INT policy)

Get message signing policy CS. Values: 0 - disabled, 1 - enabled, 2 - required.

Parameters
policyPointer to policy.
Returns
TRUE when implemented FALSE not implemented (use CS default)
NQ_BOOL udGetGlobalEncryption ( void  )

Get server global encryption.

Returns
TRUE global encryption on FALSE global encryption off
NQ_BOOL udGetInternalCapture ( void  )

Determine whether to use internal capture.

Returns
TRUE or FALSE
void udGetCaptureFileBaseFolder ( NQ_CHAR buffer,
NQ_UINT  size 
)

Get base folder path of internal capture file

Parameters
bufferbuffer for the path
sizethe size of that buffer
NQ_BOOL udGetInternalTrace ( void  )

Determine whether to use internal trace.

Returns
TRUE or FALSE
NQ_INT udGetTaskPriorities ( void  )

Get task priorities.

Returns
Task priority value.
void udGetDriverName ( NQ_CHAR buffer)

Get CIFS driver name.

Parameters
bufferBuffer for name
void udGetHostName ( NQ_CHAR buffer,
NQ_UINT  length 
)

Get host name.

Parameters
bufferBuffer for name
lengthLength to be returned (not null terminated)
void udGetLogFileBaseFolder ( NQ_CHAR buffer,
NQ_UINT  size 
)

Get base folder path of log file

Parameters
bufferBuffer for the path
sizeThe size of that buffer
void udGetMaxDiskSize ( NQ_UINT32 size)

Get disk size limit for shares

Parameters
sizePointer to size limit